<?php
require 'config.php';

//Get the images from database
$sql = "SELECT image_name FROM images ORDER BY upload_time DESC";
$result = $conn->query($sql);

// check if anything there
if($result->num_rows > 0){ ?>

<div>
<!-- showing all raws from DB -->
	<?php while($row = $result->fetch_assoc()){
		$imageURL = './uploads/'.$row['image_name'];
	?>
		<img src="<?php echo $imageURL; ?>" width="150" height="100" />
	<?php } ?>	 
</div>

<?php }else{ ?>
	<p style="color: red;">Image(s) not found...</p>
<?php } ?>